package com.java.exer1;

public class RegexTest_4 {
    public static void main(String[] args) {
        System.out.println(checkEmail("631292631@qq.com"));
    }

    /**
     * 检查邮箱
     */
    private static boolean checkEmail(String s) {
        return s.matches("[0-9a-zA-Z]\\w*@\\w+\\.(com|cn|org|gov|edu)");
    }
}
